package com.zr.inquiry.total.model.pojo;

import com.zr.inquiry.partner.model.pojo.Partner;
import com.zr.inquiry.spare.model.pojo.InquirySpareDetailsVo;
import com.zr.share.config.ErrorMassage;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * @ClassName InquiryAddVo
 * @Description TODO 询价清单实体类
 * @Author 马家奎
 * @Date 2019/11/15 14:30
 */
@Data
public class InquiryAddVo {


    /**
     * currencyCode : 1
     * requestForQuotationId :
     * inquiryStatus : 0
     * createTime :
     * legalPersonId : 1
     * legalPersonName : 联想（北京）有限公司
     * type : 2
     * isTax : 1
     * startTime : 2019-11-15
     * endTime : 2019-11-28
     * inquiryDetailsList : []
     * supplierDetailsList : []
     */
    private Integer id;
    @NotNull(message = ErrorMassage.CURRENCY_CODE_NOT_NULL)
    private Integer currencyCode;
    private String requestForQuotationId;
    @NotNull(message = ErrorMassage.INQUIRY_STATUS_NOT_NULL)
    private Integer inquiryStatus;

    @NotNull(message = ErrorMassage.LEGAL_PERSON_ID_NOT_NULL)
    private Integer legalPersonId;
    private String legalPersonName;
    @NotNull(message = ErrorMassage.TYPE_NOT_NULL)
    private Integer type;
    @NotNull(message = ErrorMassage.IS_TAX_NOT_NULL)
    private Integer isTax;
    @NotNull(message = ErrorMassage.START_TIME_NOT_NULL)
    private Date startTime;
    @NotNull(message = ErrorMassage.END_TIME_NOT_NULL)
    private Date endTime;
    @NotEmpty(message = ErrorMassage.INQUIRY_DETAILS_LIST_NOT_NULL)
    @Valid
    private List<InquirySpareDetailsVo> inquiryDetailsList;
    @NotEmpty(message = ErrorMassage.SUPPLIER_DETAILS_LIST_NOT_NULL)
    @Valid
    private List<Partner> supplierDetailsList;

    /*==========================================================*/
    private String creatorName;
    private Date createTime;
    private String updateName;
    private Date updateTime;


}
